# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=libgnome-games-support
pkgver=1.4.2
pkgrel=1
pkgdesc="Code shared between GNOME games"
url="https://gitlab.gnome.org/GNOME/libgnome-games-support.git"
arch=(x86_64)
license=(GPL3 LGPL3)
depends=(libgee gtk3)
makedepends=(vala git autoconf-archive)
_commit=a2f42027d74c815d15612af06fdcaa70459a7d17  # tags/1.4.2^0
source=("git+https://gitlab.gnome.org/GNOME/libgnome-games-support.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-really//;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
